//
//  BKInteractiveViewController.m
//  baokaodaxue
//
//  Created by dangyangyang on 15/5/25.
//  Copyright (c) 2015年 报考大学. All rights reserved.
//

#import "BKInteractiveViewController.h"
#import "BKSayToTaViewController.h"
#import "BKArchiveViewController.h"
#import "LoginViewController.h"
#import "BKSiShuViewModel.h"
#import "BKHeZhaoStep01ViewController.h"
#import "BKHeZhaoViewController.h"
#import "TearBookViewController.h"

@interface BKInteractiveViewController ()

@end

@implementation BKInteractiveViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];
    UITabBarController *tabBarViewController = (UITabBarController *)[[[UIApplication sharedApplication] keyWindow] rootViewController];
    [tabBarViewController.tabBar setBarTintColor:[UIColor colorWithRed:0.459 green:0.839 blue:0.863 alpha:1.000]];
}

- (void)viewWillAppear:(BOOL)animated
{
    
    [super viewWillAppear:animated];
    UITabBarController *tabBarViewController = (UITabBarController *)[[[UIApplication sharedApplication] keyWindow] rootViewController];
    if ([tabBarViewController isKindOfClass:[UITabBarController class]]) {
        [tabBarViewController.tabBar setBarTintColor:[UIColor colorWithRed:57.0/255.0 green:99.0/255.0 blue:101/255.0 alpha:1.000]];
    }
    
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
- (IBAction)sayToTa:(id)sender {
    
    BKSayToTaViewController *sayToTa = [[BKSayToTaViewController alloc] initWithNibName:NSStringFromClass([BKSayToTaViewController class]) bundle:nil];
    [self.navigationController pushViewController:sayToTa animated:YES];
}
- (IBAction)p_archive:(id)sender {
    BKArchiveViewController *archiveVC = [[BKArchiveViewController alloc] initWithNibName:NSStringFromClass([BKArchiveViewController class]) bundle:nil];
    
    
    [self.navigationController pushViewController:archiveVC animated:YES];
}
- (IBAction)p_sishu:(id)sender {
    

    TearBookViewController *tear = [[TearBookViewController alloc] initWithNibName:NSStringFromClass([TearBookViewController class]) bundle:nil];
    [self presentViewController:tear animated:YES completion:nil];
//    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
//    if ([userDefaults objectForKey:@"Cookie"] !=nil) {
//        
//        [BKSiShuViewModel sishuWithType:@"1" success:^(NSString *colleage) {
//            
//        } failure:^(NSString *message) {
//            
//        }];
//        
//        
//    }else{
//        
//        LoginViewController *login = [[LoginViewController alloc] initWithNibName:NSStringFromClass([LoginViewController class]) bundle:nil];
//        [self presentViewController:login animated:YES completion:nil];
//        
//    }
//
}
- (IBAction)p_hezhao:(id)sender {
    
    

    BKHeZhaoViewController *hezhao = [[BKHeZhaoViewController alloc] initWithNibName:NSStringFromClass([BKHeZhaoViewController class]) bundle:nil];
    [self presentViewController:hezhao animated:YES completion:nil];
    
    
//    BKHeZhaoStep01ViewController *hezhao1 = [[BKHeZhaoStep01ViewController alloc] initWithNibName:NSStringFromClass([BKHeZhaoStep01ViewController class]) bundle:nil];
//    [self presentViewController:hezhao1 animated:YES completion:nil];
}


@end
